package com.gxz.mapper;


import com.gxz.common.BasePageInfo;
import com.gxz.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from user where id= #{id}")
    public User getById(Integer id);

//    @Select("select * from user")
    public List<User> getAll(BasePageInfo basePageInfo);

    @Insert("insert into user (name,age,address,description) values (#{name}, #{age}, #{address}, #{description})")
    public Integer create(User user);

//    @Update("update user set name=#{name},age=#{age},address=#{address},description=#{description} where id = #{id}")
    public Integer update(User user);

    @Delete("delete from user where id=#{id}")
    public Integer delete(Integer id);
}
